<?xml version="1.0" encoding="utf-8"?>

<EFFECT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns ="urn:dsfx0">

  <ACCELERATION_STRUCTURE>
    <NAME>TopLevelAS</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </ACCELERATION_STRUCTURE>

  <CONSTANT_BUFFER>
    <NAME>cbCamera</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </CONSTANT_BUFFER>
  
  <CONSTANT_BUFFER>
    <NAME>cbPostEffect_RT_AO</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </CONSTANT_BUFFER>
  
  <CONSTANT_BUFFER>
    <NAME>cbPostEffect_RT_AO_Auto</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </CONSTANT_BUFFER>

  <CONSTANT_BUFFER>
    <NAME>cbGlobalClipping</NAME>
    <!--<NEEDS_OPTION>Clipping</NEEDS_OPTION>-->
    <STAGES>RaygenStage</STAGES>
  </CONSTANT_BUFFER>

  <STRUCTURED_BUFFER>
    <NAME>hashMapBuffer</NAME>
    <DECLARATION>
      <MEMBER>
        <NAME>hashMap[]</NAME>
        <TYPE>HashRecordContrib</TYPE>
      </MEMBER>
    </DECLARATION>
    <ALIGNMENT_RULES>std430</ALIGNMENT_RULES>
    <OPTION_GRAMMAR>D_HRTAO</OPTION_GRAMMAR>
    <STAGES>RaygenStage</STAGES>
  </STRUCTURED_BUFFER>
  
  <SAMPLER>
    <NAME>positions</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>texture2D</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>texture2DMS</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </SAMPLER>
  
  <SAMPLER>
    <NAME>cellIndices</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>utexture2D</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>utexture2DMS</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </SAMPLER>

  <STORAGE_IMAGE>
    <NAME>changeList</NAME>
    <DECLARATION>
      <TYPE>uimage2D</TYPE>
      <FORMAT>r32ui</FORMAT>
      <OPTION_GRAMMAR>D_HRTAO !IS_MSAA</OPTION_GRAMMAR>
    </DECLARATION>
    <DECLARATION>
      <TYPE>uimage2DMS</TYPE>
      <FORMAT>r32ui</FORMAT>
      <OPTION_GRAMMAR>D_HRTAO IS_MSAA</OPTION_GRAMMAR>
    </DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </STORAGE_IMAGE>
  
  <TECHNIQUE>
    <NAME>Default</NAME>
    
    <RAYTRACING_PASS>
      <NAME>Default</NAME>

      <RAYGEN_STAGE>commonHelpers ubos PostEffect_RT_AO_Helpers PostEffect_RT_AO_RS</RAYGEN_STAGE>
      <MISS_STAGE>PostEffect_RT_AO_Helpers PostEffect_RT_AO_MS</MISS_STAGE>
      <HIT_GROUP>
        <CLOSEST_HIT_STAGE>ubos PostEffect_RT_AO_Helpers PostEffect_RT_AO_CHS</CLOSEST_HIT_STAGE>
        <ANY_HIT_STAGE>PostEffect_RT_AO_Helpers PostEffect_RT_AO_AHS</ANY_HIT_STAGE>
      </HIT_GROUP>
    
    </RAYTRACING_PASS>
  </TECHNIQUE>
</EFFECT>
